package tests;

import static org.junit.Assert.*;

import org.junit.Test;

import auxiliaries.LogicalClock;

public class LogicalClockTest {

	@Test
	public void testGetClock() {
		LogicalClock lg = new LogicalClock();
		long old = -1;
		long now;
		for (int i = 0; i < 10; i++) {
			assertTrue(old < (now = lg.getTime()));
			old = now;
		}
		assertEquals(0, (new LogicalClock()).getTime());
	}

}
